package com.jintian.smart.kernel.security.controller;

import com.jintian.smart.base.api.security.form.HeartBeatRecordQueryForm;
import com.jintian.smart.base.api.security.view.HeartBeatRecordVO;
import com.jintian.smart.kernel.common.controller.SupportBaseController;
import com.jintian.smart.kernel.core.constant.SwaggerTagConst;
import com.jintian.smart.kernel.core.domain.ResponseDTO;
import com.jintian.smart.kernel.security.service.HeartBeatService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import org.beetl.sql.core.page.PageResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 心跳记录
 */

@RestController
@RequestMapping("/sec/heartBeat")
@Tag(name = SwaggerTagConst.Support.HEART_BEAT)
public class HeartBeatController extends SupportBaseController {
    @Resource
    private HeartBeatService heartBeatService;

    @PostMapping("/query")
    @Operation(summary = "查询心跳记录")
    public ResponseDTO<PageResult<HeartBeatRecordVO>> query(@RequestBody @Valid HeartBeatRecordQueryForm pageParam) {
        return heartBeatService.pageQuery(pageParam);
    }
}
